package com.demo.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.demo.pojo.ResultVO;
import com.demo.pojo.User;
import com.demo.pojo.UserDTO;
import jakarta.mail.MessagingException;

public interface UserService extends IService<User> {

    /**
     * 发送验证码
     * @param email 需要收到验证码的邮箱
     * @return
     */
    ResultVO getCode(String email) throws MessagingException;

    /**
     * 注册账号
     * @param userDTO
     * @return
     */
    ResultVO register(UserDTO userDTO);

    /**
     * 登录
     * @param userDTO
     * @return
     */
    ResultVO login(UserDTO userDTO);

    /**
     * 登录验证码
     * @param email
     * @return
     */
    ResultVO getCodeLogin(String email) throws MessagingException;

    /**
     * 修改密码
     * @param userDTO
     * @return
     */
    ResultVO updatePassword(UserDTO userDTO);

    /**
     * 忘记密码发送验证码
     * @param email
     * @return
     */
    ResultVO getCodeForget(String email) throws MessagingException;

    /**
     * 获取当前登录用户的信息
     * @return
     */
    ResultVO<User> getCurrentUser();
}
